package com.tyc.c09;

import com.tyc.c09.service.MyService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 学习增强的几种方式
 */
@SpringBootApplication
public class Application09 {
    private static final Logger log = LoggerFactory.getLogger(Application09.class);

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Application09.class, args);

        MyService myService = context.getBean(MyService.class);
        log.info("被增强的代理类型：{}",myService.getClass());
        myService.foo();
    }
}
